home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / !Interfaces / Universal Interfaces 2.0a1 / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-17  |  36.1 KB  |  891 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Script.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.  Sunday, July 17, 1994. 
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. */
  16.  
  17. #ifndef __SCRIPT__
  18. #define __SCRIPT__
  19.  
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. /*    #include <ConditionalMacros.h>                                */
  25.  
  26. #ifndef __QUICKDRAW__
  27. #include <Quickdraw.h>
  28. #endif
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <QuickdrawText.h>                                    */
  31.  
  32. #ifndef __INTLRESOURCES__
  33. #include <IntlResources.h>
  34. #endif
  35.  
  36. #ifndef __EVENTS__
  37. #include <Events.h>
  38. #endif
  39. /*    #include <OSUtils.h>                                        */
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if GENERATINGPOWERPC
  46. #pragma options align=mac68k
  47. #endif
  48.  
  49. #ifdef __CFM68K__
  50. #pragma lib_export on
  51. #endif
  52.  
  53.  
  54. enum {
  55. /* Script System constants */
  56.     smSystemScript                = -1,                            /*designates system script.*/
  57.     smCurrentScript                = -2,                            /*designates current font script.*/
  58.     smAllScripts                = -3,                            /*designates any script    */
  59.     smRoman                        = 0,                            /*Roman*/
  60.     smJapanese                    = 1,                            /*Japanese*/
  61.     smTradChinese                = 2,                            /*Traditional Chinese*/
  62.     smKorean                    = 3,                            /*Korean*/
  63.     smArabic                    = 4,                            /*Arabic*/
  64.     smHebrew                    = 5,                            /*Hebrew*/
  65.     smGreek                        = 6,                            /*Greek*/
  66.     smCyrillic                    = 7,                            /*Cyrillic*/
  67.     smRSymbol                    = 8,                            /*Right-left symbol*/
  68.     smDevanagari                = 9,                            /*Devanagari*/
  69.     smGurmukhi                    = 10,                            /*Gurmukhi*/
  70.     smGujarati                    = 11,                            /*Gujarati*/
  71.     smOriya                        = 12,                            /*Oriya*/
  72.     smBengali                    = 13,                            /*Bengali*/
  73.     smTamil                        = 14,                            /*Tamil*/
  74.     smTelugu                    = 15,                            /*Telugu*/
  75.     smKannada                    = 16,                            /*Kannada/Kanarese*/
  76.     smMalayalam                    = 17                            /*Malayalam*/
  77. };
  78.  
  79. enum {
  80.     smSinhalese                    = 18,                            /*Sinhalese*/
  81.     smBurmese                    = 19,                            /*Burmese*/
  82.     smKhmer                        = 20,                            /*Khmer/Cambodian*/
  83.     smThai                        = 21,                            /*Thai*/
  84.     smLaotian                    = 22,                            /*Laotian*/
  85.     smGeorgian                    = 23,                            /*Georgian*/
  86.     smArmenian                    = 24,                            /*Armenian*/
  87.     smSimpChinese                = 25,                            /*Simplified Chinese*/
  88.     smTibetan                    = 26,                            /*Tibetan*/
  89.     smMongolian                    = 27,                            /*Mongolian*/
  90.     smGeez                        = 28,                            /*Geez/Ethiopic*/
  91.     smEthiopic                    = 28,                            /*Synonym for smGeez*/
  92.     smEastEurRoman                = 29,                            /*Synonym for smSlavic*/
  93.     smVietnamese                = 30,                            /*Vietnamese*/
  94.     smExtArabic                    = 31,                            /*extended Arabic*/
  95.     smUninterp                    = 32,                            /*uninterpreted symbols, e.g. palette symbols*/
  96.     smKlingon                    = 32,                            /*Klingon*/
  97. /*Obsolete names for script systems (kept for backward compatibility)*/
  98.     smChinese                    = 2,                            /*(use smTradChinese or smSimpChinese)*/
  99.     smRussian                    = 7,                            /*(old name for smCyrillic)*/
  100. /* smMaldivian = 25;         (no more smMaldivian!)*/
  101.     smAmharic                    = 28,                            /*(old name for smGeez)*/
  102.     smSlavic                    = 29                            /*(old name for smEastEurRoman)*/
  103. };
  104.  
  105. enum {
  106.     smSindhi                    = 31,                            /*(old name for smExtArabic)*/
  107. /* Language Codes */
  108.     langEnglish                    = 0,                            /* smRoman script */
  109.     langFrench                    = 1,                            /* smRoman script */
  110.     langGerman                    = 2,                            /* smRoman script */
  111.     langItalian                    = 3,                            /* smRoman script */
  112.     langDutch                    = 4,                            /* smRoman script */
  113.     langSwedish                    = 5,                            /* smRoman script */
  114.     langSpanish                    = 6,                            /* smRoman script */
  115.     langDanish                    = 7,                            /* smRoman script */
  116.     langPortuguese                = 8,                            /* smRoman script */
  117.     langNorwegian                = 9,                            /* smRoman script */
  118.     langHebrew                    = 10,                            /* smHebrew script */
  119.     langJapanese                = 11,                            /* smJapanese script */
  120.     langArabic                    = 12,                            /* smArabic script */
  121.     langFinnish                    = 13,                            /* smRoman script */
  122.     langGreek                    = 14,                            /* smGreek script */
  123.     langIcelandic                = 15,                            /* extended Roman script */
  124.     langMaltese                    = 16,                            /* extended Roman script */
  125.     langTurkish                    = 17,                            /* extended Roman script */
  126.     langCroatian                = 18,                            /* Serbo-Croatian in extended Roman script */
  127.     langTradChinese                = 19                            /* Chinese in traditional characters */
  128. };
  129.  
  130. enum {
  131.     langUrdu                    = 20,                            /* smArabic script */
  132.     langHindi                    = 21,                            /* smDevanagari script */
  133.     langThai                    = 22,                            /* smThai script */
  134.     langKorean                    = 23,                            /* smKorean script */
  135.     langLithuanian                = 24,                            /* smEastEurRoman script */
  136.     langPolish                    = 25,                            /* smEastEurRoman script */
  137.     langHungarian                = 26,                            /* smEastEurRoman script */
  138.     langEstonian                = 27,                            /* smEastEurRoman script */
  139.     langLettish                    = 28,                            /* smEastEurRoman script */
  140.     langLatvian                    = 28,                            /* Synonym for langLettish */
  141.     langSaamisk                    = 29,                            /* ext. Roman script, lang. of the Sami/Lapp people of Scand. */
  142.     langLappish                    = 29,                            /* Synonym for langSaamisk */
  143.     langFaeroese                = 30,                            /* smRoman script */
  144.     langFarsi                    = 31,                            /* smArabic script */
  145.     langPersian                    = 31,                            /* Synonym for langFarsi */
  146.     langRussian                    = 32,                            /* smCyrillic script */
  147.     langSimpChinese                = 33,                            /* Chinese in simplified characters */
  148.     langFlemish                    = 34,                            /* smRoman script */
  149.     langIrish                    = 35,                            /* smRoman script */
  150.     langAlbanian                = 36                            /* smRoman script */
  151. };
  152.  
  153. enum {
  154.     langRomanian                = 37,                            /* smEastEurRoman script */
  155.     langCzech                    = 38,                            /* smEastEurRoman script */
  156.     langSlovak                    = 39,                            /* smEastEurRoman script */
  157.     langSlovenian                = 40,                            /* smEastEurRoman script */
  158.     langYiddish                    = 41,                            /* smHebrew script */
  159.     langSerbian                    = 42,                            /* Serbo-Croatian in smCyrillic script */
  160.     langMacedonian                = 43,                            /* smCyrillic script */
  161.     langBulgarian                = 44,                            /* smCyrillic script */
  162.     langUkrainian                = 45,                            /* smCyrillic script */
  163.     langByelorussian            = 46,                            /* smCyrillic script */
  164.     langUzbek                    = 47,                            /* smCyrillic script */
  165.     langKazakh                    = 48,                            /* smCyrillic script */
  166.     langAzerbaijani                = 49,                            /* Azerbaijani in smCyrillic script (USSR) */
  167.     langAzerbaijanAr            = 50,                            /* Azerbaijani in smArabic script (Iran) */
  168.     langArmenian                = 51,                            /* smArmenian script */
  169.     langGeorgian                = 52,                            /* smGeorgian script */
  170.     langMoldavian                = 53,                            /* smCyrillic script */
  171.     langKirghiz                    = 54,                            /* smCyrillic script */
  172.     langTajiki                    = 55,                            /* smCyrillic script */
  173.     langTurkmen                    = 56                            /* smCyrillic script */
  174. };
  175.  
  176. enum {
  177.     langMongolian                = 57,                            /* Mongolian in smMongolian script */
  178.     langMongolianCyr            = 58,                            /* Mongolian in smCyrillic script */
  179.     langPashto                    = 59,                            /* smArabic script */
  180.     langKurdish                    = 60,                            /* smArabic script */
  181.     langKashmiri                = 61,                            /* smArabic script */
  182.     langSindhi                    = 62,                            /* smExtArabic script */
  183.     langTibetan                    = 63,                            /* smTibetan script */
  184.     langNepali                    = 64,                            /* smDevanagari script */
  185.     langSanskrit                = 65,                            /* smDevanagari script */
  186.     langMarathi                    = 66,                            /* smDevanagari script */
  187.     langBengali                    = 67,                            /* smBengali script */
  188.     langAssamese                = 68,                            /* smBengali script */
  189.     langGujarati                = 69,                            /* smGujarati script */
  190.     langPunjabi                    = 70,                            /* smGurmukhi script */
  191.     langOriya                    = 71,                            /* smOriya script */
  192.     langMalayalam                = 72,                            /* smMalayalam script */
  193.     langKannada                    = 73,                            /* smKannada script */
  194.     langTamil                    = 74,                            /* smTamil script */
  195.     langTelugu                    = 75,                            /* smTelugu script */
  196.     langSinhalese                = 76                            /* smSinhalese script */
  197. };
  198.  
  199. enum {
  200.     langBurmese                    = 77,                            /* smBurmese script */
  201.     langKhmer                    = 78,                            /* smKhmer script */
  202.     langLao                        = 79,                            /* smLaotian script */
  203.     langVietnamese                = 80,                            /* smVietnamese script */
  204.     langIndonesian                = 81,                            /* smRoman script */
  205.     langTagalog                    = 82,                            /* smRoman script */
  206.     langMalayRoman                = 83,                            /* Malay in smRoman script */
  207.     langMalayArabic                = 84,                            /* Malay in smArabic script */
  208.     langAmharic                    = 85,                            /* smEthiopic script */
  209.     langTigrinya                = 86,                            /* smEthiopic script */
  210.     langGalla                    = 87,                            /* smEthiopic script */
  211.     langOromo                    = 87,                            /* Synonym for langGalla */
  212.     langSomali                    = 88,                            /* smRoman script */
  213.     langSwahili                    = 89,                            /* smRoman script */
  214.     langRuanda                    = 90,                            /* smRoman script */
  215.     langRundi                    = 91,                            /* smRoman script */
  216.     langChewa                    = 92,                            /* smRoman script */
  217.     langMalagasy                = 93,                            /* smRoman script */
  218.     langEsperanto                = 94,                            /* extended Roman script */
  219.     langWelsh                    = 128                            /* smRoman script */
  220. };
  221.  
  222. enum {
  223.     langBasque                    = 129,                            /* smRoman script */
  224.     langCatalan                    = 130,                            /* smRoman script */
  225.     langLatin                    = 131,                            /* smRoman script */
  226.     langQuechua                    = 132,                            /* smRoman script */
  227.     langGuarani                    = 133,                            /* smRoman script */
  228.     langAymara                    = 134,                            /* smRoman script */
  229.     langTatar                    = 135,                            /* smCyrillic script */
  230.     langUighur                    = 136,                            /* smArabic script */
  231.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script */
  232.     langJavaneseRom                = 138,                            /* Javanese in smRoman script */
  233.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script */
  234. /* Obsolete names, kept for backward compatibility */
  235.     langPortugese                = 8,                            /* old misspelled version, kept for compatibility */
  236.     langMalta                    = 16,                            /* old misspelled version, kept for compatibility */
  237.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.) */
  238.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese) */
  239.     langLapponian                = 29                            /* Synonym for langSaamisk, not correct name */
  240. };
  241.  
  242. enum {
  243. /* Regional version codes */
  244.     verUS                        = 0,
  245.     verFrance                    = 1,
  246.     verBritain                    = 2,
  247.     verGermany                    = 3,
  248.     verItaly                    = 4,
  249.     verNetherlands                = 5,
  250.     verFrBelgiumLux                = 6,                            /* French for Belgium & Luxembourg */
  251.     verSweden                    = 7,
  252.     verSpain                    = 8,
  253.     verDenmark                    = 9,
  254.     verPortugal                    = 10,
  255.     verFrCanada                    = 11,
  256.     verNorway                    = 12
  257. };
  258.  
  259. enum {
  260.     verIsrael                    = 13,
  261.     verJapan                    = 14,
  262.     verAustralia                = 15,
  263.     verArabic                    = 16,                            /* synonym for verArabia */
  264.     verFinland                    = 17,
  265.     verFrSwiss                    = 18,                            /* French Swiss */
  266.     verGrSwiss                    = 19,                            /* German Swiss */
  267.     verGreece                    = 20,
  268.     verIceland                    = 21,
  269.     verMalta                    = 22,
  270.     verCyprus                    = 23,
  271.     verTurkey                    = 24,
  272.     verYugoCroatian                = 25,                            /* Croatian system for Yugoslavia */
  273.     verIndiaHindi                = 33,                            /* Hindi system for India */
  274.     verPakistan                    = 34,
  275.     verLithuania                = 41,
  276.     verPoland                    = 42,
  277.     verHungary                    = 43,
  278.     verEstonia                    = 44,
  279.     verLatvia                    = 45
  280. };
  281.  
  282. enum {
  283.     verLapland                    = 46,
  284.     verFaeroeIsl                = 47,
  285.     verIran                        = 48,
  286.     verRussia                    = 49,
  287.     verIreland                    = 50,                            /* English-language version for Ireland */
  288.     verKorea                    = 51,
  289.     verChina                    = 52,
  290.     verTaiwan                    = 53,
  291.     verThailand                    = 54
  292. };
  293.  
  294. enum {
  295.     minCountry                    = verUS,
  296.     maxCountry                    = verThailand
  297. };
  298.  
  299. /* Obsolete region code names, kept for backward compatibility */
  300. enum {
  301.     verBelgiumLux                = 6,                            /* (use verFrBelgiumLux instead, less ambiguous) */
  302.     verArabia                    = 16,
  303.     verYugoslavia                = 25,                            /* (use verYugoCroatian instead, less ambiguous) */
  304.     verIndia                    = 33,                            /* (use verIndiaHindi instead, less ambiguous) */
  305. /* Calendar Codes */
  306.     calGregorian                = 0,
  307.     calArabicCivil                = 1,
  308.     calArabicLunar                = 2,
  309.     calJapanese                    = 3,
  310.     calJewish                    = 4,
  311.     calCoptic                    = 5,
  312.     calPersian                    = 6,
  313. /* Integer Format Codes */
  314.     intWestern                    = 0,
  315.     intArabic                    = 1,
  316.     intRoman                    = 2,
  317.     intJapanese                    = 3,
  318.     intEuropean                    = 4,
  319.     intOutputMask                = 0x8000,
  320. /* CharByte byte types */
  321.     smSingleByte                = 0,
  322.     smFirstByte                    = -1,
  323.     smLastByte                    = 1,
  324.     smMiddleByte                = 2,
  325. /* CharType field masks */
  326.     smcTypeMask                    = 0x000F,
  327.     smcReserved                    = 0x00F0
  328. };
  329.  
  330. enum {
  331.     smcClassMask                = 0x0F00,
  332.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  333.     smcRightMask                = 0x2000,
  334.     smcUpperMask                = 0x4000,
  335.     smcDoubleMask                = 0x8000,
  336. /* Basic CharType character types */
  337.     smCharPunct                    = 0x0000,
  338.     smCharAscii                    = 0x0001,
  339.     smCharEuro                    = 0x0007,
  340.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  341. /* Additional CharType character types for script systems */
  342.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  343.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  344.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  345.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  346.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  347.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  348.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  349.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  350.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  351.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  352.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  353. /* old names for some of above, for backward compatibility */
  354.     smCharFISKana                = 0x0002,                        /*Katakana*/
  355.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  356.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  357. };
  358.  
  359. enum {
  360.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  361.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  362. /* CharType classes for punctuation (smCharPunct) */
  363.     smPunctNormal                = 0x0000,
  364.     smPunctNumber                = 0x0100,
  365.     smPunctSymbol                = 0x0200,
  366.     smPunctBlank                = 0x0300,
  367. /* Additional CharType classes for punctuation in two-byte systems */
  368.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  369.     smPunctGraphic                = 0x0500,                        /* line graphics */
  370. /* CharType Katakana and Hiragana classes for two-byte systems */
  371.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  372.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  373.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  374. /* CharType Ideographic classes for two-byte systems */
  375.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  376.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  377.     smIdeographicUser            = 0x0200,                        /*user char*/
  378. /* old names for above, for backward compatibility */
  379.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  380.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  381.     smFISClassUser                = 0x0200,                        /*user char*/
  382. /* CharType Jamo classes for Korean systems */
  383.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  384.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  385.     smJamoMoeum                    = 0x0200                        /*simple vowel char*/
  386. };
  387.  
  388. enum {
  389.     smJamoBogMoeum                = 0x0300,                        /*complex vowel char*/
  390. /* CharType glyph orientation for two-byte systems */
  391.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  392.     smCharVertical                = 0x1000,                        /* vertical character form */
  393. /* CharType directions */
  394.     smCharLeft                    = 0x0000,
  395.     smCharRight                    = 0x2000,
  396. /* CharType case modifers */
  397.     smCharLower                    = 0x0000,
  398.     smCharUpper                    = 0x4000,
  399. /* CharType character size modifiers (1 or multiple bytes). */
  400.     smChar1byte                    = 0x0000,
  401.     smChar2byte                    = 0x8000,
  402. /* TransliterateText target types for Roman */
  403.     smTransAscii                = 0,                            /*convert to ASCII*/
  404.     smTransNative                = 1,                            /*convert to font script*/
  405.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  406.     smTransSystem                = 0xFF,                            /*convert to system script*/
  407. /* TransliterateText target types for two-byte scripts */
  408.     smTransAscii1                = 2,                            /*1-byte Roman*/
  409.     smTransAscii2                = 3,                            /*2-byte Roman*/
  410.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  411.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  412. };
  413.  
  414. enum {
  415.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  416.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  417.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  418.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  419. /* TransliterateText target modifiers */
  420.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  421.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  422. /* TransliterateText resource format numbers */
  423.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  424.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  425. /* TransliterateText property flags */
  426.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  427.     smTransPreLowerCasing        = 2,                            /*Convert all text to lower case before transliteration*/
  428. /* TransliterateText source mask - general */
  429.     smMaskAll                    = 0xFFFFFFFFL,                    /*Convert all text*/
  430. /* TransliterateText source masks */
  431.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  432.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  433. /* TransliterateText source masks for two-byte scripts */
  434.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  435.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  436.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  437.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  438.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  439.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  440.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  441.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  442. };
  443.  
  444. enum {
  445. /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  446.     smNotInstalled                = 0,                            /*routine not available in script*/
  447.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  448.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  449. };
  450.  
  451. enum {
  452. /* Values for script redraw flag. */
  453.     smRedrawChar                = 0,                            /*Redraw character only*/
  454.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  455.     smRedrawLine                = -1,                            /*Redraw entire line (bidirectional systems)*/
  456. /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  457.     smVersion                    = 0,                            /*Script Manager version number*/
  458.     smMunged                    = 2,                            /*Globals change count*/
  459.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  460.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  461.     smFontForce                    = 8,                            /*Force font flag*/
  462.     smIntlForce                    = 10,                            /*Force intl flag*/
  463.     smForced                    = 12,                            /*Script was forced to system script*/
  464.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  465.     smPrint                        = 16,                            /*Printer action routine*/
  466.     smSysScript                    = 18,                            /*System script*/
  467.     smLastScript                = 20,                            /*Last keyboard script*/
  468.     smKeyScript                    = 22,                            /*Keyboard script*/
  469.     smSysRef                    = 24,                            /*System folder refNum*/
  470.     smKeyCache                    = 26,                            /*obsolete*/
  471.     smKeySwap                    = 28,                            /*Swapping table handle*/
  472.     smGenFlags                    = 30,                            /*General flags long*/
  473.     smOverride                    = 32                            /*Script override flags*/
  474. };
  475.  
  476. enum {
  477.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  478. /* New for System 7.0: */
  479.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  480.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  481.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  482.     smKeyDisableState            = 42,                            /*Returns current keyboard disable state*/
  483. /* GetScriptVariable and SetScriptVariable verbs.
  484. Note: Verbs private to script systems are negative, while
  485. those general across script systems are non-negative. */
  486.     smScriptVersion                = 0,                            /*Script software version*/
  487.     smScriptMunged                = 2,                            /*Script entry changed count*/
  488.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  489.     smScriptRight                = 6,                            /*Right to left flag*/
  490.     smScriptJust                = 8,                            /*Justification flag*/
  491.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  492.     smScriptSysFond                = 12,                            /*Preferred system font*/
  493.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  494.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  495.     smScriptNumber                = 16,                            /*Script itl0 id*/
  496.     smScriptDate                = 18,                            /*Script itl1 id*/
  497.     smScriptSort                = 20,                            /*Script itl2 id*/
  498.     smScriptFlags                = 22,                            /*flags word*/
  499.     smScriptToken                = 24,                            /*Script itl4 id*/
  500.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  501.     smScriptLang                = 28                            /*Current language for script*/
  502. };
  503.  
  504. enum {
  505.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  506.     smScriptKeys                = 32,                            /*Script KCHR id*/
  507.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  508.     smScriptPrint                = 36,                            /*Script printer action routine*/
  509.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  510.     smScriptCreator                = 40,                            /*Script file creator*/
  511.     smScriptFile                = 42,                            /*Script file name*/
  512.     smScriptName                = 44,                            /*Script name*/
  513. /* There is a hole here for old Kanji private verbs 46-76 
  514.  
  515.  New for System 7.0: */
  516.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  517.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  518.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  519.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  520.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  521.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  522.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  523.     smScriptAliasStyle            = 92,                            /*style (set) to use for aliases*/
  524. /* Special script code values for International Utilities */
  525.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  526.     iuCurrentScript                = -2,                            /* <obsolete>  current script (for font of grafPort) */
  527. /* Negative verbs for KeyScript */
  528.     smKeyNextScript                = -1,                            /* Switch to next available script */
  529.     smKeySysScript                = -2,                            /* Switch to the system script */
  530.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  531. /* New for System 7.0: */
  532.     smKeyNextKybd                = -4                            /* Switch to next keyboard in current keyscript */
  533. };
  534.  
  535. enum {
  536.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  537.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  538.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  539.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  540.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  541.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  542.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  543.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  544.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  545.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  546.     smKeyRoman                    = -17,                            /* Set keyscript to Roman. Does nothing if Roman-only
  547.                                         system, unlike KeyScript(smRoman) which forces
  548.                                         an update to current default Roman keyboard */
  549. /* Bits in the smScriptFlags word
  550. (bits above 8 are non-static) */
  551.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  552.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  553.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  554.     smsfContext                    = 3,                            /*Script is contextual*/
  555.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  556.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  557.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  558.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  559.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  560.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  561.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  562.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  563. /* Bits in the smGenFlags long.
  564. First (high-order) byte is set from itlc flags byte. */
  565.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  566.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  567.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  568.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  569. };
  570.  
  571. enum {
  572. /* Roman script constants 
  573.  The following are here for backward compatibility, but should not be used. 
  574.  This information should be obtained using GetScript. */
  575.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  576.     romanAppFond                = 3,                            /*application font id number*/
  577.     romanFlags                    = 0x0007,                        /*roman settings*/
  578. /* Script Manager font equates. */
  579.     smFondStart                    = 0x4000,                        /*start from 16K*/
  580.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  581. /* Miscellaneous font equates. */
  582.     smUprHalfCharSet            = 0x80,                            /*first char code in top half of std char set*/
  583. /* Character Set Extensions */
  584.     diaeresisUprY                = 0xD9,
  585.     fraction                    = 0xDA,
  586.     intlCurrency                = 0xDB,
  587.     leftSingGuillemet            = 0xDC,
  588.     rightSingGuillemet            = 0xDD,
  589.     fiLigature                    = 0xDE,
  590.     flLigature                    = 0xDF,
  591.     dblDagger                    = 0xE0,
  592.     centeredDot                    = 0xE1,
  593.     baseSingQuote                = 0xE2,
  594.     baseDblQuote                = 0xE3,
  595.     perThousand                    = 0xE4,
  596.     circumflexUprA                = 0xE5
  597. };
  598.  
  599. enum {
  600.     circumflexUprE                = 0xE6,
  601.     acuteUprA                    = 0xE7,
  602.     diaeresisUprE                = 0xE8,
  603.     graveUprE                    = 0xE9,
  604.     acuteUprI                    = 0xEA,
  605.     circumflexUprI                = 0xEB,
  606.     diaeresisUprI                = 0xEC,
  607.     graveUprI                    = 0xED,
  608.     acuteUprO                    = 0xEE,
  609.     circumflexUprO                = 0xEF,
  610.     appleLogo                    = 0xF0,
  611.     graveUprO                    = 0xF1,
  612.     acuteUprU                    = 0xF2,
  613.     circumflexUprU                = 0xF3,
  614.     graveUprU                    = 0xF4,
  615.     dotlessLwrI                    = 0xF5,
  616.     circumflex                    = 0xF6,
  617.     tilde                        = 0xF7,
  618.     macron                        = 0xF8,
  619.     breveMark                    = 0xF9
  620. };
  621.  
  622. enum {
  623.     overDot                        = 0xFA,
  624.     ringMark                    = 0xFB,
  625.     cedilla                        = 0xFC,
  626.     doubleAcute                    = 0xFD,
  627.     ogonek                        = 0xFE,
  628.     hachek                        = 0xFF,
  629. /* TokenType values */
  630.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  631.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  632. };
  633.  
  634. enum {
  635.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  636.     tokenWhite                    = 1,                            /*white space*/
  637.     tokenLeftLit                = 2,                            /*literal begin*/
  638.     tokenRightLit                = 3,                            /*literal end*/
  639.     tokenAlpha                    = 4,                            /*alphabetic*/
  640.     tokenNumeric                = 5,                            /*numeric*/
  641.     tokenNewLine                = 6,                            /*new line*/
  642.     tokenLeftComment            = 7,                            /*open comment*/
  643.     tokenRightComment            = 8,                            /*close comment*/
  644.     tokenLiteral                = 9,                            /*literal*/
  645.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  646.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  647.     tokenRealNum                = 12,                            /*real number*/
  648.     tokenAltReal                = 13,                            /*alternate real number*/
  649.     tokenReserve1                = 14,                            /*reserved*/
  650.     tokenReserve2                = 15,                            /*reserved*/
  651.     tokenLeftParen                = 16,                            /*open parenthesis*/
  652.     tokenRightParen                = 17,                            /*close parenthesis*/
  653.     tokenLeftBracket            = 18,                            /*open square bracket*/
  654.     tokenRightBracket            = 19                            /*close square bracket*/
  655. };
  656.  
  657. enum {
  658.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  659.     tokenRightCurly                = 21,                            /*close curly bracket*/
  660.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  661.     tokenRightEnclose            = 23,                            /*close guillemet*/
  662.     tokenPlus                    = 24,
  663.     tokenMinus                    = 25,
  664.     tokenAsterisk                = 26,                            /*times/multiply*/
  665.     tokenDivide                    = 27,
  666.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  667.     tokenSlash                    = 29,
  668.     tokenBackSlash                = 30,
  669.     tokenLess                    = 31,                            /*less than symbol*/
  670.     tokenGreat                    = 32,                            /*greater than symbol*/
  671.     tokenEqual                    = 33,
  672.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  673.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  674.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  675.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  676.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  677.     tokenColonEqual                = 39                            /*colon equal*/
  678. };
  679.  
  680. enum {
  681.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  682.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  683.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  684.     tokenExclam                    = 43,                            /*exclamation point*/
  685.     tokenTilde                    = 44,                            /*centered tilde*/
  686.     tokenComma                    = 45,
  687.     tokenPeriod                    = 46,
  688.     tokenLeft2Quote                = 47,                            /*open double quote*/
  689.     tokenRight2Quote            = 48,                            /*close double quote*/
  690.     tokenLeft1Quote                = 49,                            /*open single quote*/
  691.     tokenRight1Quote            = 50,                            /*close single quote*/
  692.     token2Quote                    = 51,                            /*double quote*/
  693.     token1Quote                    = 52,                            /*single quote*/
  694.     tokenSemicolon                = 53,
  695.     tokenPercent                = 54,
  696.     tokenCaret                    = 55,
  697.     tokenUnderline                = 56,
  698.     tokenAmpersand                = 57,
  699.     tokenAtSign                    = 58,
  700.     tokenBar                    = 59                            /*vertical bar*/
  701. };
  702.  
  703. enum {
  704.     tokenQuestion                = 60,
  705.     tokenPi                        = 61,                            /*lower-case pi*/
  706.     tokenRoot                    = 62,                            /*square root symbol*/
  707.     tokenSigma                    = 63,                            /*capital sigma*/
  708.     tokenIntegral                = 64,                            /*integral sign*/
  709.     tokenMicro                    = 65,
  710.     tokenCapPi                    = 66,                            /*capital pi*/
  711.     tokenInfinity                = 67,
  712.     tokenColon                    = 68,
  713.     tokenHash                    = 69,                            /*e.g. #*/
  714.     tokenDollar                    = 70,
  715.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  716.     tokenFraction                = 72,
  717.     tokenIntlCurrency            = 73,
  718.     tokenLeftSingGuillemet        = 74,
  719.     tokenRightSingGuillemet        = 75,
  720.     tokenPerThousand            = 76,
  721.     tokenEllipsis                = 77,
  722.     tokenCenterDot                = 78,
  723.     tokenNil                    = 127
  724. };
  725.  
  726. enum {
  727.     delimPad                    = -2,
  728. /* obsolete, misspelled token names kept for backward compatibility */
  729.     tokenTilda                    = 44,
  730.     tokenCarat                    = 55
  731. };
  732.  
  733. enum {
  734. /* Table selectors for GetItlTable */
  735.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  736.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  737.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  738.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  739.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  740.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  741.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  742.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  743.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  744.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  745. };
  746.  
  747. /* end of stuff moved from Packages.h */
  748. enum {
  749.     tokenOK,                                                    /* TokenResults */
  750.     tokenOverflow,                                                /* TokenResults */
  751.     stringOverflow,                                                /* TokenResults */
  752.     badDelim,                                                    /* TokenResults */
  753.     badEnding,                                                    /* TokenResults */
  754.     crash                                                        /* TokenResults */
  755. };
  756.  
  757. typedef SInt8 TokenResults;
  758.  
  759. typedef char CharByteTable[256];
  760.  
  761. typedef short TokenType;
  762.  
  763. typedef TokenType DelimType[2];
  764.  
  765. typedef TokenType CommentType[4];
  766.  
  767. struct TokenRec {
  768.     TokenType                        theToken;
  769.     Ptr                                position;                    /*pointer into original source*/
  770.     long                            length;                        /*length of text in original source*/
  771.     StringPtr                        stringPosition;                /*Pascal/C string copy of identifier*/
  772. };
  773. typedef struct TokenRec TokenRec;
  774.  
  775. typedef TokenRec *TokenRecPtr;
  776.  
  777. struct TokenBlock {
  778.     Ptr                                source;                        /*pointer to stream of characters*/
  779.     long                            sourceLength;                /*length of source stream*/
  780.     Ptr                                tokenList;                    /*pointer to array of tokens*/
  781.     long                            tokenLength;                /*maximum length of TokenList*/
  782.     long                            tokenCount;                    /*number tokens generated by tokenizer*/
  783.     Ptr                                stringList;                    /*pointer to stream of identifiers*/
  784.     long                            stringLength;                /*length of string list*/
  785.     long                            stringCount;                /*number of bytes currently used*/
  786.     Boolean                            doString;                    /*make strings & put into StringList*/
  787.     Boolean                            doAppend;                    /*append to TokenList rather than replace*/
  788.     Boolean                            doAlphanumeric;                /*identifiers may include numeric*/
  789.     Boolean                            doNest;                        /*do comments nest?*/
  790.     TokenType                        leftDelims[2];
  791.     TokenType                        rightDelims[2];
  792.     TokenType                        leftComment[4];
  793.     TokenType                        rightComment[4];
  794.     TokenType                        escapeCode;                    /*escape symbol code*/
  795.     TokenType                        decimalCode;
  796.     Handle                            itlResource;                /*handle to itl4 resource of current script*/
  797.     long                            reserved[8];                /*must be zero!*/
  798. };
  799. typedef struct TokenBlock TokenBlock;
  800.  
  801. typedef TokenBlock *TokenBlockPtr;
  802.  
  803. extern short GetSysDirection( void )
  804.     TWOWORDINLINE( 0x3038, 0x0BAC ); /* MOVE.W $0BAC, D0 */
  805. extern void SetSysDirection( short value )
  806.     TWOWORDINLINE( 0x31D7, 0x0BAC ); /* MOVE.W (SP),$0BAC */
  807. extern pascal short FontScript(void)
  808.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  809. extern pascal short IntlScript(void)
  810.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  811. extern pascal void KeyScript(short code)
  812.  FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  813. extern pascal short CharByte(Ptr textBuf, short textOffset)
  814.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  815. extern pascal short CharType(Ptr textBuf, short textOffset)
  816.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  817. extern pascal Boolean IsCmdChar(const EventRecord *eventRecord, short test)
  818.  FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  819. extern pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
  820.  FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  821. extern pascal Boolean ParseTable(CharByteTable table)
  822.  FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  823. extern pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  824.  FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  825. extern pascal short FontToScript(short fontNumber)
  826.  FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  827. extern pascal long GetScriptManagerVariable(short selector)
  828.  FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  829. extern pascal OSErr SetScriptManagerVariable(short selector, long param)
  830.  FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  831. extern pascal long GetScriptVariable(short script, short selector)
  832.  FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  833. extern pascal long GetScript(short script, short verb)
  834.  FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  835. extern pascal OSErr SetScriptVariable(short script, short selector, long param)
  836.  FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  837. extern pascal OSErr SetScript(short script, short verb, long param)
  838.  FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  839. /*  New for 7.1  */
  840. extern pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
  841.  FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  842. extern pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
  843.  FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  844. extern pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
  845.  FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  846. extern pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
  847.  FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  848. extern pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
  849.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  850. extern pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
  851.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  852. extern pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
  853.  FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  854. extern pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
  855.  FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  856. /* Moved from Packages.h */
  857. extern pascal Intl0Hndl GetIntlResource(short theID)
  858.  THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  859. extern pascal void SetIntlResource(short refNum, short theID, Intl0Hndl intlHandle)
  860.  THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  861. extern pascal void ClearIntlResourceCache(void)
  862.  THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  863. extern pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Intl0Hndl *itlHandle, long *offset, long *length)
  864.  THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  865. #if OLDROUTINENAMES
  866. #define SetSysJust(newJust) SetSysDirection(newJust)
  867. #define GetSysJust() GetSysDirection()
  868. #define Font2Script(fontNumber) FontToScript(fontNumber)
  869. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  870. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  871. #define IUGetIntl(theID) GetIntlResource(theID)
  872. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  873. #define IUClearCache() ClearIntlResourceCache()
  874. #define IUGetItlTable(script, tableCode, itlHandle, offset, length)  \
  875.     GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  876. #endif
  877.  
  878. #ifdef __CFM68K__
  879. #pragma lib_export off
  880. #endif
  881.  
  882. #if GENERATINGPOWERPC
  883. #pragma options align=reset
  884. #endif
  885.  
  886. #ifdef __cplusplus
  887. }
  888. #endif
  889.  
  890. #endif /* __SCRIPT__ */
  891.